package net.yunzhanyi.client.domain.vo;

import org.apache.commons.lang3.time.DateFormatUtils;

import java.util.Date;

/**
 * @author bestct
 * @date 2022/10/3
 * @type 类
 */
public class UserVo {

    /**
     * 用户ID
     */
    private Long uid;

    /**
     * 账号头像
     */
    private String avatarUrl;

    /**
     * 用户昵称
     */
    private String nickName;

    /**
     * 生日
     */
    private Date birthday;


    /**
     * 性别
     */
    private Short sex;

    /**
     * 签名
     */
    private String signature;

    /**
     * 创建时间
     */
    private String joinTime;

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Short getSex() {
        return sex;
    }

    public void setSex(Short sex) {
        this.sex = sex;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(Long joinTime) {

        this.joinTime = DateFormatUtils.format(joinTime, "yyyy-MM-dd");
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("UserVo{");
        sb.append("uid=").append(uid);
        sb.append(", avatarUrl='").append(avatarUrl).append('\'');
        sb.append(", nickName='").append(nickName).append('\'');
        sb.append(", birthday=").append(birthday);
        sb.append(", sex=").append(sex);
        sb.append(", signature='").append(signature).append('\'');
        sb.append(", joinTime='").append(joinTime).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
